home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / sound / musicmaniii_inst / data / arexx / importids.mmx < prev    next >
Text File  |  1997-12-01  |  2KB  |  79 lines

  1. /*
  2.  * ImportIDs.mmx
  3.  *
  4.  *
  5.  * ©1997 Andreas Mair
  6.  *
  7.  *
  8.  * Version:      1.00
  9.  * Date:         29.07.1997
  10.  *
  11.  * Function:     Import the "ID#?"-files created by various CD-player-programs
  12.  *               (e.g. "MultiCDPlayer" or "Skandalfo's CD Player") in MusicManIII.
  13.  *
  14.  * Requirements: MusicManIII V3.06 (or above)
  15.  *               ARexx running
  16.  *               a directory with your "ID#?"-files
  17.  *
  18.  * Usage:        - first start MusicManIII and load the CD-file where you want to import
  19.  *                 (of course you can also create a new CD-file)
  20.  *               - then go to a CLI (or Shell)
  21.  *               - start this script with the path to your "ID#?"-files
  22.  *                 (e.g. "rx ImportIDs.mmx Work:disks")
  23.  *               - wait until the script ends
  24.  *               - take a look at your imported CDs:
  25.  *                 -> you'll have to "Read in" the song's length of each CD
  26.  *                    (use CD-Player or the song's popup menu)
  27.  *                 -> you may want to delete all non-audio CDs
  28.  *               - have fun   ;-)
  29.  */
  30.  
  31.  
  32. PARSE ARG pathname
  33.  
  34. IF pathname="" THEN DO
  35.     SAY 'Usage: ImportIDs.mmx <path to your "ID#?"-files>'
  36.     EXIT
  37. END
  38.  
  39. IF ~SHOW( 'L', "rexxsupport.library" ) THEN DO
  40.     IF ~ADDLIB( "rexxsupport.library", 0, -30, 0 ) THEN DO
  41.         SAY "Can't open 'rexxsupport.library'"
  42.         EXIT
  43.     END
  44. END
  45.  
  46. ADDRESS "MUSICMAN"
  47.  
  48. filename=SHOWDIR( pathname, 'f' )
  49.  
  50. IF (RIGHT( pathname, 1 ) ~= '/') & (RIGHT( pathname, 1 ) ~= ':') THEN
  51.     pathname=pathname"/"
  52.  
  53. SAY pathname
  54.  
  55. i        =1
  56. currentID=SUBWORD( filename, i, 1 )
  57.  
  58. DO WHILE currentID ~= ""
  59.     SAY "Working on " currentID "..."
  60.  
  61.     IF OPEN( FH, pathname""currentID, 'READ' ) THEN DO
  62.         artist=READLN( FH )
  63.         title =READLN( FH )
  64.         'RECORD NEW ARTIST="'artist'" TITLE="'title'"'
  65.  
  66.         song=READLN( FH )
  67.         DO WHILE song ~= ""
  68.             'SONG APPEND NAME="'song'"'
  69.             song=READLN( FH )
  70.         END
  71.  
  72.         temp=CLOSE( FH )
  73.     END
  74.  
  75.     i=i+1
  76.     currentID=SUBWORD( filename, i, 1 )
  77. END
  78.  
  79.